/**
 * Ellie骑紫色的车，Rohan没有骑绿色的车
 * Mike和Ellie不是第一也不是最后
 * 骑蓝色车的人领先Fatma
 * 骑绿色车的人领先骑紫色车的人
 */

public class bicycle {
    public static void main(String[] args) {
        //M,E,R,F分别为Mike,Ellie,Rohan,Fatma
        //红紫蓝绿分别为r,p,b,g
        int M, E, R, F;
        int r, p, b, g;

        for (M = 1; M < 5; M++) {
            for (E = 1; E < 5; E++) {
                for (R = 1; R < 5; R++) {
                    for (F = 1; F < 5; F++) {
                        for (r = 1; r < 5; r++) {
                            for (p = 1; p < 5; p++) {
                                for (b = 1; b < 5; b++) {
                                    for (g = 1; g < 5; g++) {
                                        if (M != E && M != R && M != F && E != R && E != F && R != F) {
                                            if (r != p && r != b && r != g && p != b && p != g && b != g) {
                                                if (E == p && R != g && M != 1 && M != 4 && E != 1 && E != 4 && b < F && g < p) {
                                                    System.out.println("Mike:" + M + ", " + "Ellie:" + E + ", " + "Rohan:" + R + "," + "Fatma" + F);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
